package com.book.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.mapper.Condition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.book.mapper.CategoryMapper;
import com.book.entity.Category;
import com.book.service.CategoryService;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> query(Category category) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("dto", category);
        return categoryMapper.selectList(new Condition());
    }

    @Override
    public Category findById(String cid) {
        return categoryMapper.selectById(cid);
    }

}
